﻿using System;
using __Able.Network.Packets;

namespace __Able.Network.Events
{
    public class EventArgs<O, I> : EventArgs
        where I : _InPacket
        where O : _OutPacket
    {
        public EventArgs(O outPacket, I inPacket)
        {
            this.InPacket = inPacket;
            this.OutPacket = outPacket;
        }
        /// <summary>
        /// 接收到的包
        /// </summary>
        /// <value></value>
        public I InPacket { get; private set; }
        /// <summary>
        /// 对应的发送包
        /// </summary>
        /// <value></value>
        public O OutPacket { get; private set; }
    }

    public class EventArgs<T> : EventArgs
        where T : _Packet
    {
        public EventArgs(T packet)
        {
            this.Packet = packet;
        }

        public T Packet { get; private set; }

    }
}
